package com.powervision.mvvmdemo.ui.repository

import com.powervision.http.entity.ApiResponse
import com.powervision.http.base.BaseRepository
import com.powervision.mvvmdemo.ui.http.RetrofitClient
import com.powervision.mvvmdemo.ui.model.UserModel

/**
 * @auth: njb
 * @date: 2021/12/13 14:06
 * @desc: 描述
 */
class LoginRepository : BaseRepository() {
    private val mService by lazy {
        RetrofitClient.service
    }

    suspend fun userLogin(username: String, password: String): ApiResponse<UserModel?> {
        return executeHttp {
            mService.login(username, password)
        }
    }
}